package cn.anecansaitin.industrialization_expansion.common.cap;

import cn.anecansaitin.industrialization_expansion.api.common.cap.IModifiedAttribute;
import net.minecraft.nbt.INBT;
import net.minecraft.util.Direction;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;

import javax.annotation.Nullable;

public class CapabilityModifiedAttribute {
    @CapabilityInject(IModifiedAttribute.class)
    public static Capability<IModifiedAttribute> ATTRIBUTE;

    public static void register() {
        CapabilityManager.INSTANCE.register(IModifiedAttribute.class, new Capability.IStorage<IModifiedAttribute>() {
            @Nullable
            @Override
            public INBT writeNBT(Capability<IModifiedAttribute> capability, IModifiedAttribute instance, Direction side) {
                return null;
            }

            @Override
            public void readNBT(Capability<IModifiedAttribute> capability, IModifiedAttribute instance, Direction side, INBT nbt) {

            }
        }, () -> null);
    }
}
